<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'app',
  watch: {
    '$route'(to, from) {
      if (from.path.indexOf("main") > -1 && to.path === '/home') {
        this.$store.commit('savePreRoute',from.path)
      } else {
        this.$store.commit('savePreRoute',null)
      }
    }
  }
}
</script>

<style>
#app {
  font-family: "Microsoft YaHei",'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
ul {
  list-style: none;
  padding: 0;
}
</style>
